	window.onload = function() {
				var btn1=document.getElementsByClassName("photo_prev")[0];
				var btn2=document.getElementsByClassName("photo_next")[0];
				var box=document.getElementsByClassName("photo_box")[0];
				var ul=document.getElementsByClassName("photo_list")[0];
				
				var li=ul.children;
				
				ul.innerHTML+=ul.innerHTML;
				ul.style.width=li[0].offsetWidth*li.length+'px';
				
				
				var n=0;
				var timer=null;
				btn1.onclick=function(){
					to();
				}
				function to(){
					clearInterval(timer)
					timer=setInterval(function(){
						n-=10;
						if(n<-ul.offsetWidth/2){
							n=0;
						}
						ul.style.left=n+'px';
					},50)
				}
				btn2.onclick=function(){
					clearInterval(timer)
					timer=setInterval(function(){
						n+=10;
						if(n>0){
							n=-ul.offsetWidth/2;
						}
						ul.style.left=n+'px';
					},50)
				}
			
				ul.onmousemove=function(){
					clearInterval(timer);
				}
				ul.onmouseout=function(){
					to();
				}
				
			}
